package com.eduask.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.eduask.beans.Client;
import com.eduask.dao.ClientDAO;
import com.eduask.service.ClientService;

@Transactional
@Service
public class ClientServiceImpl implements ClientService{

	@Autowired
	private ClientDAO clientDAO;
	
	@Override
	public List<Client> findAll() {

		return clientDAO.findAllClients();
	}

	@Override
	public void save(Client client) {
		clientDAO.saveClient(client);
	}

	@Override
	public void delete(Client client) {
		clientDAO.removeClient(client);
	}

	@Override
	public Client findById(Integer id) {

		return clientDAO.findClientById(id);
	}

	@Override
	public void update(Client client) {
		clientDAO.updateClient(client);
	}

}
